# coding:utf-8
# *******************************************************************
# * Copyright 2021-2080 evilbinary
# * 作者: evilbinary on 01/01/20
# * 邮箱: rootdebug@163.com
# ********************************************************************
import os

Import('env')


AddOption(
    '--w',
    dest='w',
    nargs=1,
    type='string',
    action='store',
    metavar='DIR',
    help='w image',
)

env = env.Clone(
  w=GetOption('w'),
  ENV = os.environ,
  PATH= [os.environ['PATH'],'/opt/local/bin' ],
  )

env.Program('hello.elf', [
    'hello.c',
    '../../libs/libc/libc.a',
    '../../libs/libalgorithm/libalgorithm.a',
    ],
    CFLAGS='$CFLAGS -Ilibs/include/c/ ',
    LINKFLAGS= '$LINKFLAGS --entry main -Tuser.ld')

